set hive.exec.dynamic.partition=true;            --  动态分区
set hive.exec.dynamic.partition.mode=nonstrict;
set hive.exec.max.dynamic.partitions=90;         --  每天生成 60 个分区
set hive.exec.max.dynamic.partitions.pernode=90; --  每天生成 60 个分区

insert overwrite table jms_dim.dim_lmdm_sys_network_expand
select
id
,code
,name
,parent_network_id
,parent_network_code
,parent_network_name
,in_distribution_id
,in_distribution_code
,in_distribution_name
,out_distribution_id
,out_distribution_code
,out_distribution_name
,entrepot_id
,entrepot_name
,subordinate_agent_name
,subordinate_agent_id
,subordinate_agent_code
,regional_id
,regional_desc
,provider_id
,provider_desc
,city_id
,city_desc
,area_id
,area_desc
,first_code
,second_code
,first_and_second_code
,country_code
,country_desc
,financial_center_id
,financial_center_code
,financial_center_desc
,first_franchisee_id
,first_franchisee_code
,first_franchisee_name
,second_franchisee_id
,second_franchisee_code
,second_franchisee_name
,longitude
,latitude
,create_time
,update_time
,is_distribution_center
,first_second_third_code
,third_code
,entrepot_code
,type_id
from jms_ods.yl_lmdm_sys_network_expand where dt= '{{ execution_date | cst_ds }}'  and subordinate_agent_code <> 'Test001' and code <> '888888'
 distribute by 1 ;